<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends CommonController {
	//首页
    public function index()
    {
        $this->display();
    }

    public function drag()
    {
        $this->display();
    }

    public function left()
    {
        $this->display();
    }

    public function main()
    {
        //用户信息
        $user = M('user')->where(array('id'=>$_SESSION['id']))->find();
        $this->assign('user',$user);

        //商品信息
        //总数
        $goods_count = M('goods')->count();
        $this->assign('goods_count',$goods_count);
        //新品数
        $news_count = M('goods')->where('is_new=1')->count();
        $this->assign('news_count',$news_count);
        //热销数
        $hots_count = M('goods')->where('is_hot=1')->count();
        $this->assign('hots_count',$hots_count);
        //上架数
        //回收站数
        $sale_count = M('goods')->where('is_on_sale=1')->count();
        $this->assign('sale_count',$sale_count);
        //回收站数
        $res_count = M('goods')->where('is_delete=0')->count();
        $this->assign('res_count',$res_count);

        $this->display();
    }
    
    public function top()
    {
        $this->display();
    }


}